#!/usr/bin/python3

userName = input('请输入用户名:')

f = open('/etc/passwd', 'r')
user = [x for x in f if x.split(':')[0] == userName]
f.close()

if len(user) > 0:
    print('用户存在')
else:
    print('用户不存在')
